package org.tgcms.core.dal.appengine.domain;

import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;

import org.tgcms.core.dal.dto.Attachment;

import com.google.appengine.api.datastore.Key;

//@PersistenceCapable//(identityType=IdentityType.APPLICATION, detachable="true")
@PersistenceCapable(detachable="true")
public class AppengineAttachment extends AppenginePage implements Attachment {

	@Persistent
	String fileName;

	@Persistent
	String fileKey;

	@Persistent
	String servingUrl;

	public AppengineAttachment(Key key) {
		super(key);
	}
	
//	public AppengineAttachment(Attachment attachment) {
//		this.fileName = attachment.getFileName();
//		this.fileKey = attachment.getFileKey();
//		this.servingUrl = attachment.getServingUrl();
//	}

	public String getFileName() {
		return fileName;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

	public String getFileKey() {
		return fileKey;
	}

	public void setFileKey(String fileKey) {
		this.fileKey = fileKey;
	}

	public String getServingUrl() {
		return servingUrl;
	}

	public void setServingUrl(String servingUrl) {
		this.servingUrl = servingUrl;
	}

}
